package com.harvest.scientific.ladder.page.fa

import androidx.recyclerview.widget.LinearLayoutManager
import com.harvest.scientific.ladder.R
import com.harvest.scientific.ladder.base.BaseFragment
import com.harvest.scientific.ladder.databinding.MultiFragmentLayoutBinding
import com.harvest.scientific.ladder.page.adapter.MultiStatusListAdapter
import org.intellij.lang.annotations.JdkConstants.TitledBorderTitlePosition

/**
 * @author：zenglingwen
 * @date：2024-06-10 21:16
 * @desc：
 */
class MultiFragment: BaseFragment<MultiFragmentLayoutBinding>() {
    override fun initPage() {
        super.initPage()
        _binding.actionBar.apply {
            isShowBack(true)
            setTitle(getTitle())
        }
        initAdapter()
    }

    private val adapter = MultiStatusListAdapter()

    private fun initAdapter() {

        _binding.recyclerview.run {
            layoutManager = LinearLayoutManager(requireActivity())
            adapter = this@MultiFragment.adapter
        }
        _binding.recyclerview.adapter = adapter
    }

    override fun getTitle(): String {
        return getString(R.string.multi_title)
    }

    companion object {
        fun newInstance(): MultiFragment {
            return MultiFragment()
        }
    }
}